<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/jquery-weui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
    <link rel="stylesheet" type="text/css" href="../../css/order.css" />
    <title>银行回单</title>
    <script src="../../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/baseConfig.js" type="text/javascript" charset="utf-8"></script>
    <script src=" http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>

<body>
    <div class="imgWarp" style="margin-top: 0;">

    </div>
    <!--<div class="demos-content-padded" style="padding: 0.3rem 1.1rem;">
			<a href="register.html" class="weui-btn weui-btn_mini weui-btn_default Register" style="float: left;">未运完</a>
			<a href="javascript:;" class="weui-btn weui-btn_mini weui-btn_primary Login" style="float: right;margin-top: 0;background: #28c81e;">已运完</a>
		</div>-->
    <div class="weui-gallery" style="display: none">
        <span class="weui-gallery__img">
						<img src="" style="width: 100%;height: auto;margin-top: 50%"/>
					</span>
    </div>
</body>
<script type="text/javascript">
    $(document).ready(function() {
        baseConfig.historyBack()
        $(".imgWarp img").on("click", function() {
            var src = $(this).attr("src")
            $(".weui-gallery").show()
            $(".weui-gallery__img img").attr("src", src)
            $(".weui-gallery").on("click", function() {
                $(this).hide()
            })
        })
        $.ajax({
                type: "get",
                url: baseConfig.localHttp + "weChatApi/fgclient/getBankFallbackOrder",
                async: false,
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded'
                },
                data: {
                    orderNo: baseConfig.GetQueryString("orderNo")
                },
                success: function(data) {
                    console.log(data)
                    var status = baseConfig.GetQueryString("status")
                    if (status == 1) {
                        $(".demos-content-padded").hide()
                    } else {
                        $(".demos-content-padded").show()
                    }
                    if (data.code == 100) {
                        var $img = ""
                        $(".imgWarp").empty()
                        if (data.content.length == 0) {
                            $.toptip("暂无数据", 1200, 'error')
                        } else {
                            for (var i = 0; i < data.content.length; i++) {
                                $img += "<img src=" + baseConfig.imglocalHttp + data.content[i] + ">"
                            }
                            $(".imgWarp").append($img)
                            var imgsurl = [];
                            var nowurl = '';
                            var imgObj = $(".imgWarp img");
                            for (var i = 0; i < imgObj.length; i++) {
                                imgsurl[i] = imgObj[i].src;
                                imgObj[i].onclick = function() {
                                    nowurl = this.src;
                                    wx.previewImage({
                                        current: nowurl,
                                        urls: imgsurl
                                    });
                                }
                            }
                        }
                    } else {
                        $.toptip(data.content, 1200, 'error')
                    }
                },
                error: function() {
                    $.hideLoading();
                    $.toast("请求失败", "cancel");
                }
            })
            //			$(".Login").on("click", function() {
            //				$.ajax({
            //					type: "get",
            //					url: baseConfig.localHttp + "weChatApi/fgclient/confirmTransOver",
            //					async: false,
            //					headers: {
            //						'Content-Type': 'application/x-www-form-urlencoded'
            //					},
            //					data: {
            //						orderNo: baseConfig.GetQueryString("orderNo")
            //					},
            //					success: function(data) {
            //						console.log(data)
            //						if(data.code == 100) {
            //							$.toptip(data.content, 1200, 'success')
            //							setTimeout(function() {
            //								window.location.replace(document.referrer)
            //							}, 1200)
            //						} else {
            //							$.toptip(data.content, 1200, 'error')
            //						}
            //					},
            //					error: function() {
            //						$.hideLoading();
            //						$.toast("请求失败", "cancel");
            //					}
            //				})
            //			})
    })
</script>

</html>